﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/General.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="PB.FBMembershipWebApp.Mem.Default" %>
<%@ MasterType VirtualPath="~/Masters/General.Master" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
    <h2>My Account / Member Page</h2>
    <p>Welcome facebook user, </p>
    <table border="0" cellpadding="5px" cellspacing="5px">
        <tr>
            <td>
                <fb:profile-pic uid="loggedinuser" size="small" linked="false" />
            </td>
            <td valign="top">
                <fb:name uid="loggedinuser" useyou="false" linked="false" />
            </td>
        </tr>
    </table>
    <p></p>
    <script type="text/javascript">
        function callPublish(msg, attachment, action_link) {
            FB.ensureInit(function() {
            FB.Connect.streamPublish('', attachment, action_link);
            
            });
        }
        
        var c = readCookie("newuserflag");
        if (c == "true") {
            callPublish('', { 'name': 'Facebook Membership Provider', 'href': 'http://www.facebook.com/apps/application.php?id=168568224856', 'description': 'Custom membership provider for ASP.Net using Facebook Connect features.', 'media': [{ 'type': 'image', 'src': 'http://photos-a.ak.fbcdn.net/photos-ak-sf2p/v43/52/168568224856/app_1_168568224856_3836.gif', 'href': 'http://www.facebook.com/apps/application.php?id=168568224856' }, { 'type': 'image', 'src': 'http://learning-leisure.com/pb/imgs/logo163x59.gif', 'href': 'http://www.p-bhatt.com/2009/10/facebook-membership-provider.html'}] }, [{ 'text': 'Live Demo', 'href': 'http://pinalbhatt.cloudapp.net:8081/' }, { 'text': '@Google Code', 'href': 'http://code.google.com/p/fbmembership/' }, { 'text': '@Codeplex', 'href': 'http://fbmembership.codeplex.com/'}]);
            eraseCookie("newuserflag")
        }      
        
    </script>
    <br /><br />
    <p><b>Publish to Facebook :</b></p>
    <div style="margin-left:10px">
        <p>Post on your wall : </p>
        <p style="text-align:center"><input type="button" onclick="callPublish('',null,null);return false;" value="Post on Wall" /> </p>
        <br />
        <p>Post on your wall about this application: </p>
        <p style="text-align:center"><input type="button" value="Post About this App" onclick="callPublish('', { 'name': 'Facebook Membership Provider', 'href': 'http://www.facebook.com/apps/application.php?id=168568224856', 'description': 'Custom membership provider for ASP.Net using Facebook Connect features.', 'media': [{ 'type': 'image', 'src': 'http://photos-a.ak.fbcdn.net/photos-ak-sf2p/v43/52/168568224856/app_1_168568224856_3836.gif', 'href': 'http://www.facebook.com/apps/application.php?id=168568224856' }, { 'type': 'image', 'src': 'http://learning-leisure.com/pb/imgs/logo163x59.gif', 'href': 'http://www.p-bhatt.com/2009/10/facebook-membership-provider.html'}] }, [{ 'text': 'Live Demo', 'href': 'http://pinalbhatt.cloudapp.net:8081/' }, { 'text': '@Google Code', 'href': 'http://code.google.com/p/fbmembership/' }, { 'text': '@Codeplex', 'href': 'http://fbmembership.codeplex.com/'}]);" /> </p>
    </div>
    <br /><br />
    <p><a href="MyFBInfo.aspx">My Facebook Info</a></p>
    <br />
    <p><a href="AppUsers.aspx">Who all are using this Application</a></p>
    <br />
</asp:Content>
